package collections;

import java.util.LinkedList;
import java.util.Queue;

/**
 * 单端队列 : add( E e ) / element() / remove()
 */
public class QueueTest1 {
    public static void main(String[] args) {

        Queue<String> queue =new LinkedList<>();

        queue.add( "何艺庆" );
        queue.add( "乐闽庭" );
        queue.add( "周义富" );
        queue.add( "龚怡群" );
        queue.add( "蒋嘉豪" );

        System.out.println( queue );

        String head = queue.element();//获取头部元素
        System.out.println( head );
        System.out.println( "head : " + queue );

        String remove = queue.remove();
        System.out.println( remove );
        System.out.println( "remove : " + queue );

        queue.clear();
        System.out.println( "clear : " + queue );


    }
}
